//
//  ExplainationHeaderView.m
//  PhongThuyHuongNha
//
//  Created by Le Anh Tai on 10/5/13.
//  Copyright (c) 2013 Le Anh Tai. All rights reserved.
//

#import "HeaderSectionResultView.h"
#import "UIConstants.h"

@implementation HeaderSectionResultView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = COLOR_BLACK;
        
        //
        _label = [[UILabel alloc] init];
        _label.textAlignment = NSTextAlignmentCenter;
        _label.textColor = COLOR_WHITE;
        _label.font = FONT_HELVETICANEUE(FONT_SIZE_HEADER_RESULT - 1);
        _label.backgroundColor = [UIColor clearColor];
        [self addSubview:_label];

        //
        _lineView = [[LineView alloc]init];
        [self addSubview:_lineView];
    }
    
    return self;
}

- (void)loadHeaderText:(NSString *)text
{
    _label.text = text;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _label.frame = RECT(0, 0, self.width, self.height);
    _lineView.frame = RECT(0, 0, self.width, 2);
        
}
@end
